import os
import json
from config import APP


def p2p_jsonn(testcode, key):
    add = APP + os.sep + "data" + os.sep + testcode
    print(add)
    list = []
    with open(add, "r", encoding="utf-8") as f:
        for data in json.load(f).get(key):
            list.append(tuple(data.values())[1:])
    return list


if __name__ == '__main__':
    print(p2p_jsonn("register.json", "img_code"))







